package com.whfc.fmam.entity.enums;

/**
 * @Author: ；likang
 * @Description: 偏差结果:0-正常 ,1-超正差 ,-1:超负差
 * @Date:Create：in 2019/12/20 15:40
 * @Version：1.0
 */
public enum DiffResult {

    NORDIFF(0, "正常"),

    POSDIFF(1, "超正差"),

    NEGDIFF(-1, "超负差");

    private Integer value;

    private String desc;

    DiffResult(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static DiffResult parseValue(Integer value) {
        switch (value) {
            case 0:
                return NORDIFF;
            case 1:
                return POSDIFF;
            case -1:
                return NEGDIFF;
        }
        return null;
    }
}
